<?php
// Debug regex test
$content = file_get_contents(__DIR__ . '/app/common/model/ChannelStats.php');

echo "File content length: " . strlen($content) . "\n";
echo "Looking for table property...\n";

if (preg_match("/protected\s*\$table\s*=\s*['\"]([^'\"]+)['\"]/", $content, $matches)) {
    echo "Found table: " . $matches[1] . "\n";
} else {
    echo "No table property found with current regex\n";
    
    // Try different patterns
    if (preg_match("/protected.*table.*=/", $content, $matches)) {
        echo "Found 'protected table =' pattern: " . $matches[0] . "\n";
    }
    
    // Show lines around table property
    $lines = explode("\n", $content);
    foreach ($lines as $i => $line) {
        if (strpos($line, 'protected') !== false && strpos($line, 'table') !== false) {
            echo "Line $i: " . trim($line) . "\n";
        }
    }
}

?>